<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui" xml:lang="en" lang="en">
<head>
    <title>My Facelets Page</title>
    <meta http-equiv="keywords" content="enter,your,keywords,here"/>
    <meta http-equiv="description"
          content="A short description of this page."/>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

    <!--<link rel="stylesheet" type="text/css" href="styles.css">-->
</head>
<body>
<ui:composition template="General.xhtml">
    <ui:define name="title">发表新话题 </ui:define>
    <ui:define name="content">
        <ui:include src="AdminFilePanel.xhtml"></ui:include>
        <h:panelGrid columns="5">
            <h:outputLink value="ZoneList.jspx" styleClass="topNav1">
                <h:outputText value="讨论"/>
            </h:outputLink>
            <h:outputText value=">>"/>
            <h:outputLink styleClass="topNav1"
                          value="ThreadList.jspx?id=#{addNewThread.zone.id}">
                <h:outputText value="#{addNewThread.zone.name}"/>
            </h:outputLink>
            <h:outputText value=">>"/>
            <h:outputText value="发表新贴" styleClass="mark"/>
        </h:panelGrid>
        <p:separator/>
        <h:panelGrid columns="2" rendered="#{clientSession.ifLogin}" styleClass="generalInfo">
            <h:outputLabel value="标题："></h:outputLabel>
            <p:inputText value="#{addNewThread.thread.title}" style="width:600px;"></p:inputText>
            <h:outputLabel value="内容："></h:outputLabel>
            <h:panelGroup>
                <h:panelGrid columns="2" style="width:200px;">
                    <h:outputLink value="ClientListFile.jspx" styleClass="common" target="_blank">
                        <h:outputText value="上传文件"></h:outputText>
                    </h:outputLink>
                    <p:commandLink value="选择个人文件" action="#{clientListFile.synDB}" styleClass="common"
                                   update="AdminFilePanel" oncomplete="AdminFilePanel.show();return false"/>

                </h:panelGrid>
                <p:editor value="#{addNewThread.talk.content}" width="700" style="width:700px;">
                    <ui:include src="EditorConfig.xhtml"></ui:include>
                </p:editor>
                <h:outputText value="注：本编辑器会验证输入内容，从其它网页或word直接拷贝的内容请点按钮“Paste as text”，或用记事本过滤掉格式。"
                              style="color:green;"/>
            </h:panelGroup>
        </h:panelGrid>
        <p:separator/>
        <p:commandButton value="发表新贴" action="#{addNewThread.add_ok}" ajax="false"></p:commandButton>
    </ui:define>
</ui:composition>
</body>
</html>
